package com.example.workspace;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.Mapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

@Controller
@SpringBootApplication
public class WorkspaceApplication {

    public static void main(String[] args) {
        SpringApplication.run(WorkspaceApplication.class, args);
    }

    @GetMapping(value = "/hi")
    public String hi(){

        Calendar can = Calendar.getInstance();

        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ssSSS ");
        return "/123";
//        return "<h1 align='center' id='time'>hi,<a  style='color:red'>"+ sdf.format(can.getTime()) +"</a>,666</h1>" +
//                "<script>" +
//                "setInterval(function(){" +
//                "window.location.reload();" +
//                "},2000);" +
//                "</script>";
    }
}
